CCDW_ReplicationArchiveREADME.txt

Greetings! This is the replication archive for Campbell et. al (2018), "Relationship between network clustering in a therapeutic community and reincarceration following discharge." 

Note, the predicted probabilities produced here may differ slightly from those presented in the manuscript based upon the version of the riskRegression package you are using.  This should only differ at marginal levels and should not change the inferences made, but users should nevertheless be aware.  

This archive is designed to be run through executing the three lines of code found in CCDW_RunFile.R.  This file only requires that you update the working directory to where the replication archive is located.  The archive contains the following code:
-CCHW_RunFile.R: This is a run file that is designed to compile all code and require minimal effort in replicating the figures and tables produced in the manuscript.  To use this file you will need to modify the working directory to the location of the replication archive.  Running this file from start to finish will call all necessary other files to produce Figures 1 and 2 and Tables 1 and 2 in the working directory selected.
-CCHW_ReplicationArchive.R: This is the script that contains all the code necessary to conduct the analyses.  This file should only be of relevance to those who are interested in seeing how analyses were conducted.  
-WCAttrib.csv: Anonymized TC member data.
-WCM-ledge: Network data.
-WCM-sedge: Network data.
-CCDW_SessionInfo.txt: The R Session Information used for the analyses conducted in the last replication attempt.  Note that this may differ from the set up used in the manuscript.

If you use the run file then files corresponding to figures and tables will be produced.  Once the CCDW_RunFile.R is fully executed, the following files should be produced: 
-Figure1.png: Figure 1 from the manuscript.
-Figure2.png: Figure 2 from the manuscript.  This may differ slightly based upon the version of the riskRegression package used.
-Table1.txt: Information that approximates the information contained in Table 1.
-Table2.txt: Table 2 from the manuscript.
-CDDW_SurvivalData.RData: Data used for the analyses.
-InterpProbs.txt: Predicted probabilities discussed in the manuscript.  These may differ from those in the manuscript based upon the version of the riskRegression package used.
